<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组操作-2</title>
</head>
<body>

</body>
<script>


    /***数组遍历*/

    var arr = [1,3,23,4];

/* for(var i=0;i<arr.length;i++){
        console.log(arr[i]);
    }*/

    // for(var key in arr){
    //     console.log(arr[key]);
    // }
    //
    var employee1 = {
        name:'M',
        age:23
    }

    /* employee1.name
     employee1['name']*/

    for(var key in employee1){
        console.log(employee1[key]); // employee1.name
    }

</script>
</html>